<template>
	<view class="my-search-container" :style="{backgroundColor:bgColor1}">
		<view class="my-search-box" @click="searchBoxHandler()" :style="{backgroundColor:bgColor2}">
			<uni-icons type="search" color="#828d96" size="20" class="px-3"></uni-icons>
			<view class="title font text-muted">搜索商品</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			bgColor1: {
				type: String,
				default: "#eee"
			},
			bgColor2: {
				type: String,
				default: "#fff"
			}
		},
		data() {
			return {

			};
		},
		methods: {
			searchBoxHandler() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container {
		width: 100%;
		padding: 15rpx 0 10rpx 0;
		background-color: #eeeeee50;
		position: relative;

	}

	.my-search-box {
		margin: 0 auto;
		width: 90%;
		height: 70rpx;
		background-color: #fff;
		border-radius: 14rpx;
		color: #eee;
		display: flex;
		align-items: center;

		.title {
			display: flex;
			align-items: center;
			line-height: 0;
		}
	}
</style>